<?php
echo $javascript->link('jquery');
echo $javascript->link('checkedAll');
?>
 <script type="text/javascript">
	$(function()
	{
		$("#close").click(function(){		
			window.close();							
		});
	});

	function mycheck() {
		var delArr = $(":checkbox:checked");
		var str = "";
		for(var i=0;i<delArr.length;i++) {
			var del = delArr[i].value;
			if(del!="")
			{
				str += del;
				str += "/";
			}
		}
		$("#delStr").val(str);
		$("#f2").submit();	
	}
</script>
<div class="tabflex">

<?php
	echo $form->create('Uesemail',array('action'=>"resumesend",'type'=> 'post','enctype'=>'multipart/form-data','id'=>'f22','onsubmit'=>'return mycheck();'));
?>
<fieldset><legend><?php __('resumesend');?></legend>
	<table width="100%" cellspacing="0" cellpadding="0" border="0" style="text-align: left">
		<tr>
			<td width="50"></td>
			<td width="100"><?php __('Email consignee');//收件人?>:</td>
			<td width="621"><?php echo $form->text('to',array('default'=>$email['Email']['to'],'class'=>'TextBoxL'))?></td>
			<td></td>
		</tr>
		<tr>
			<td></td>
			<td><?php __('Email sender');//发件人?>:</td>
			<?php 
			    $from="";
			    if(count($mail)>0)
			    $from=$mail[0]['Uesemail']['yourEmail'];
			?>
			<td width="621"><?php echo $form->text('from',array('default'=>$from,'class'=>'TextBoxL'))?></td>
			<td></td>
		</tr>
		<tr>
			<td></td>
			<td><?php echo "抄送人";?>:</td>
			<td width="621"><?php echo $form->text('bcc',array('default'=>$email['Email']['bcc'],'class'=>'TextBoxL'))?></td>
			<td></td>
		</tr>
		<tr>
			<td></td>
			<td><?php __('subject');//主题?>:</td>
			<td width="621"><?php echo $form->text('subject',array('default'=>$email['Email']['subject'],'class'=>'TextBoxL'))?></td>
			<td></td>
		</tr>
		<tr>
			<td ></td>
			<td valign="top"><?php __('Email Content');//邮件正文?>:</td>
			<td width="621">
			<?php echo $form->textarea('content',array('id'=>'main_content','style'=>'display:none'));?>
			<iframe src="<?php echo ROOT_WEB_PATH; ?>/edit/editor.htm?id=main_content&ReadCookie=0" frameBorder="0" marginHeight="0" marginWidth="0" scrolling="No" width="621" height="457"></iframe></td>
			<td></td>
		</tr>
		<tr>
			<td></td>
			<td><?php __('Email Attachment');//附件?>:</td>
			<td width="621"><?php echo $form->file('Attachment',array('label'=>false,'size'=>50,'name'=>'Attachment','id'=>'ff','class'=>'TextBoxL'));?></td>
			<td></td>
		</tr>
	</table>
	<div id="nav1" style="width:97%">选择简历报告：
<table width="100%" cellpadding="0" cellspacing="0" border='1' class="tab1">
	<tr>
		<th width="70px"><?php echo $form->checkbox('',array('id'=>'checkedAll'));?></th>
		<?php echo $form->hidden('delStr',array('name'=>'id','id'=>'delStr'));?>
		<th ><?php echo __('文件名');?></th>
		<th ><?php echo __('上传人');?></th>
		<th ><?php echo __('上传时间');?></th>
	</tr>
	<!-- Here's where we loop through our $Notes array, printing out post info --> 
	
	<?php 
	foreach ($attachments as $datas): 
	?>
		<tr class=normal onmouseover='this.className= "over " '
			onmouseup='this.className= "over " '
			onmouseout='this.className= "normal " '>
			<td>
<!-- 批量删除选择 -->				
			<?php echo $form->checkbox($datas['Resumereport']['id'], array('value' => $datas['Resumereport']['id'],'name'=>'checkbox_name'));?>
			</td>
			<td title="<?php echo $datas['Resumereport']['name']; ?>">
			<?php 	if($datas['Resumereport']['name']!=null)
					{	
						$dir="files-resumereportfiles";
						echo $html->link($datas['Resumereport']['name'],
							'/recruitpositions/down1/'.$dir.'/'.$datas['Resumereport']['name']);
					}
			?> 
			</td>
			<td title="<?php echo $datas['Resumereport']['creater']; ?>"><?php echo $datas['Resumereport']['creater']; ?></td>
			<td title="<?php echo $datas['Resumereport']['created']; ?>"><?php echo $datas['Resumereport']['created']; ?></td>
		</tr> 
	<?php endforeach; ?>  
</table>
</div>
</fieldset>
	<table width="100%" cellspacing="0" cellpadding="0" border="0" style="text-align: left">
	<tr>
		<td width="50"></td>
		<td width="100"><?php echo $form->button('发送邮件',array('type'=>'submit','class'=>'btn4'));?>
		<td width="100"><?php echo $form->button('关闭',array('class'=>'btn2','id'=>'close'));?>
		</td>
	</tr>
	</table>

	<?php echo $form->end();?>

</div>


